/**
 * @param {string} s
 * @return {boolean}
 */
 var areOccurrencesEqual = function(s) {
    let map = new Map()
    console.log(typeof s);
    for(let i =0;i < s.length;i++) {
        console.log(s[i]);
        let c = s[i]
        map.set(c, map.has(c) ? map.get(c) + 1 : 1)
          
    }
    console.log(map);
    let b = [...map.values()]
    console.log(b);
    let set  = new Set(b)
    console.log(set.size);
    if (set.size == 1) {
        return true 
    } else {
        return false 
    }
};
   let res = areOccurrencesEqual("abacbcd")
console.log(res);